package day06;

public class Person {
    //成员属性
    private String name;//姓名
    private int age;//年龄
    //无参构造
    public Person(){
        this.name = null;
        this.age = -1;
    }
    //全参构造
    public Person(String name,int age){
        this.name = name;
        this.age = age;
    }
    //一参构造
    public Person(String name){
        this(name, -1);
    }
    public void show(){
        System.out.println("姓名:"+this.name);
        System.out.println("年龄:"+this.age);
    }
}
